package com.example.springbootelasticsearch.canal;

import com.alibaba.otter.canal.protocol.CanalEntry;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @Description: canal事件
 * @Author zhangdongkang
 * @Date 2022/9/27
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CanalEvent {
	/**
	 * 库
	 */
	private String database;
	/**
	 * 表
	 */
	private String table;
	/**
	 * 类型
	 */
	private CanalEntry.EventType eventType;
	/**
	 * 主键
	 */
	private CanalEntry.Column idColumn;
	/**
	 * 列
	 */
	private List<CanalEntry.Column> columns;
}
